package cn.iocoder.yudao.module.measure.dal.mysql.point;



import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.measure.controller.admin.point.VO.DtuInfoPageReqVO;
import cn.iocoder.yudao.module.measure.dal.dataobject.point.DtuInfoDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * DTU信息表
 * </p>
 *
 * @author zhengbzh
 * @date 2025-06-09 16:47:17
 * @create [2025-06-09 16:47:17] [zhengbzh] [代码生成器生成]
 */
@Mapper
public interface BusinessDtuInfoMapper extends BaseMapperX<DtuInfoDO> {

    List<DtuInfoDO> findTree(String measurePointName);


    default PageResult<DtuInfoDO> selectPage(DtuInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DtuInfoDO>()
                .betweenIfPresent(DtuInfoDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(DtuInfoDO::getRegId, reqVO.getRegId())
                .eqIfPresent(DtuInfoDO::getImei, reqVO.getImei())
                .eqIfPresent(DtuInfoDO::getAreaCode, reqVO.getAreaCode())
                .eqIfPresent(DtuInfoDO::getAddressCode, reqVO.getAddressCode())
                .eqIfPresent(DtuInfoDO::getDtuModel, reqVO.getDtuModel())
                .likeIfPresent(DtuInfoDO::getDtuName, reqVO.getDtuName())
                .orderByDesc(DtuInfoDO::getId));
    }

//    BasePage<BusinessDtuInfo> queryList(BasePage<BusinessDtuInfo> page, DtuSearch search);


}


